public class text6 {
    public static void main(String[] args) {
        int num=12345;
        int temp=num;
        int count=0;
        while (num!=0){
            num=num/10;
            count++;
        }

        int[]arr=new int[count];
        int index= arr.length-1;
        while (temp!=0){
            int ge=temp%10;
            arr[index]=ge;
            temp=temp/10;
            index--;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]+" ");
        }


    }
}
